import cv2
import numpy as np

img = cv2.imread('statue_small.jpg')
rows = len(img)
cols = len(img[0])
p1 = np.zeros((3, 2), np.float32)
p1[0] = [0, 0]
p1[1] = [cols - 1, 0]
p1[2] = [0, rows - 1]
p2 = np.zeros((3, 2), np.float32)
p2[0] = (50, 0)
p2[1] = (cols - 1, 0)
p2[2] = (0, rows - 1)

M = cv2.getAffineTransform(p1, p2)
dst = cv2.warpAffine(img, M, (cols, rows))
cv2.imshow('img', img)
cv2.imshow('dst', dst)
cv2.waitKey()
cv2.destroyAllWindows()

